/* ip.h */

#ifndef IP_H_FILE
#define IP_H_FILE

typedef unsigned int net_u32;
typedef unsigned long long net_u64;

#define IP_MAKE(a,b,c,d)  ( (((a)&0xff)<<24) | (((b)&0xff)<<16) | (((c)&0xff)<<8) | ((d)&0xff) )

int ip_from_string(const char *str, net_u32 *ip);
int ip_set_nonblock(int sock);
net_u32 ip_guess_local_address(net_u32 hint);

#endif /* IP_H_FILE */
